Run oadp-operator e2e against kdm-controller/kdm-plugin PRs (oadp-dev, oadp-1.6) - #83049
Open
kaovilai wants to merge 19 commits into
Open
Run oadp-operator e2e against kdm-controller/kdm-plugin PRs (oadp-dev, oadp-1.6)#83049kaovilai wants to merge 19 commits into
kaovilai wants to merge 19 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds real oadp-operator e2e coverage for
migtools/kubevirt-datamover-controllerandmigtools/kubevirt-datamover-plugin, on bothoadp-devandoadp-1.6, per openshift/oadp-operator#1832 (Group A2: operator-reconciled controllers gated on a DPA feature flag). Each repo's presubmit installs oadp-operator directly from its promoted bundle image viaoperator-sdk run bundle, substitutes the PR-built controller/plugin image into the running operator, and runs oadp-operator's own e2e suite — including the KubeVirt VM backup/restore specs already in that suite (e.g. openshift/oadp-operator#2350).This depends on openshift/release#83110 (merged), which first added the promoted
oadp-operator-index/oadp-operator-e2e-testsimages. This PR replaces the index half of that with a promoted bundle instead — see "Why not an index" below for why the original index-based design didn't actually work.Design
openshift/oadp-operator(base config for each branch)operator.bundles[].skip_building_index: true(as: oadp-operator-bundle) builds and promotes just the bundle image (oadp-operator-bundle), no index/catalog at all — see rationale below.oadp-operator-e2e-tests(the e2e test binary) is unchanged.migtools/kubevirt-datamover-controller+kubevirt-datamover-plugin(oadp-devandoadp-1.6)e2e-test-awspresubmit per branch (run_if_changed, not always-on):ipi-aws-pre→optional-operators-operator-sdk-non-ci-bundle-imageinstalls oadp-operator directly from the promoted bundle (OO_BUNDLE: registry.ci.openshift.org/konveyor/oadp-operator-bundle:{oadp-dev,oadp-1.6}) viaoperator-sdk run bundle— no index/CatalogSource image involved. (operator-sdkstill creates a CatalogSource/OperatorGroup/Subscription under the hood — it just serves the catalog from a bundle-backed pod it manages itself, inopenshift-adp, rather than pointing at a pre-built index image. The prior index-based design's CatalogSource also lived inopenshift-adp, so this isn't a new namespace footprint; verified oadp-operator's e2e suite has no unfiltered pod-count assertions or namespace teardown that this would disturb — its one pod check is scoped byLabelSelector: "component=velero".)set-related-image: discovers the Subscription OLM created (oc get subscription -n ${OO_INSTALL_NAMESPACE} -o jsonpath=...—operator-sdk run bundledoesn't write a SHARED_DIR marker for it the wayoptional-operators-subscribedoes; the namespace is created fresh by this same step script if it doesn't exist, so exactly one Subscription is expected), thenoc patch subscription ... RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER=(_PLUGINfor the plugin repo) viaSubscription.spec.config.env, OLM's supported override mechanism: per OLM's own design doc, values set here overwrite same-named CSV env vars and survive reconciliation, unlike patching the Deployment directly. Polls the Deployment's own env value before callingoc rollout status(checking immediately after the patch is racy — can report the pre-existing rollout as already complete before OLM notices the Subscription change).make TEST_VIRT=true test-e2efrom the promotedtest-oadp-operatorimage, same as before.Also fixes a real bug in the shared
optional-operators-operator-sdk-non-ci-bundle-imagestep:INSTALL_MODE_ARG=--install-mode="${INSTALL_MODE_ARG}"was self-referential and silently droppedOO_INSTALL_MODEfor every consumer of that step. Fixed to reference${OO_INSTALL_MODE}. Note: for oadp-operator specifically this isn't load-bearing — its CSV only declaresOwnNamespaceas a supported install mode, sooperator-sdk's own fallback logic (pick the first supported mode when none is explicitly forced) would land onOwnNamespaceregardless of the bug. It's still a real bug worth fixing (and we setOO_INSTALL_MODE: OwnNamespaceexplicitly regardless, so behavior here is pinned rather than incidental) — just correcting the record that it wasn't actually blocking this PR.Why not an index
The original design (this PR's earlier revisions, and #83110) promoted an
oadp-operator-indexbuilt via ci-operator'soperator.bundles(noskip_building_index). Rehearsing against the real promoted images failed withBundleUnpackFailed: Bundle image pull failed. Root cause, confirmed from oadp-operator's own promotion postsubmit log: ci-operator builds the bundle as an image inside the building job's own namespace, then bakes a reference to that bundle's pullspec into the generated index. That reference is reachable only while the building job's namespace is still alive (same-job consumption, e.g. oadp-operator's own periodic e2e, works fine) — we'd promoted only the index, never the bundle, so once oadp-operator's build namespace was torn down, the baked-in bundle reference became permanently unreachable from any other job's namespace.Fix: promote the bundle itself (precedent:
quay/quay-operatoruses the sameskip_building_index: truepattern) and install directly from it viaoperator-sdk run bundle(precedent:openshift-file-integrity-operator, which already installs cross-repo from a bundle image this way, no index/catalog needed at all). Confirmed the bundle pull itself is not a concern — the failed rehearsal'sCatalogSourcealready reachedREADYpulling fromregistry.ci.openshift.org/konveyor/...(same host, same namespace, same cluster pull secret the bundle now uses).OLMv1 compatibility
Unaffected by the above — this PR doesn't produce an FBC catalog either. Same underlying gap as before: the bundle is legacy
registry+v1format, and oadp-operator's CSV hasn't yet declaredAllNamespacesinstall mode, both tracked separately for OLMv1 adoption.Testing
make ci-operator-config/make jobspass cleanly for all 6 changed configs. Generated job diff confirms the oadp-operator postsubmit's promotion target changed fromci-indextooadp-operator-bundle(and the standaloneci-indexpresubmit is nowci-bundle-oadp-operator-bundle) — the kdm-side job files are unchanged since multi-stage step graphs (pre/post/workflow) resolve from config at ci-operator runtime, not the static Prow job YAML.coderabbit review --agentagainstupstream/mainreports 0 findings.Test plan
make ci-operator-config/make jobspass for all 6 changed configs.ci-index→oadp-operator-bundle) took effect correctly./pj-rehearseagainst the new bundle-direct install path — noBundleUnpackFailed, CSV reachesSucceeded,set-related-imagefinds exactly one Subscription and its override actually applies (not yet exercised by any prior rehearsal — the previous run died at bundle-unpack, before reaching this step).Note
Responses generated with Claude